package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.LessonMenuMapper;
import com.education.wisdom.pojo.Catalog;
import com.education.wisdom.pojo.LessonMenu;
import com.education.wisdom.service.LessonMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 教师私有备课目录表 服务层实现
 *
 * @author d
 * @date 2020-07-09 14:51:34
 */
@Service
public class LessonMenuServiceImpl implements LessonMenuService {

    @Autowired
    private LessonMenuMapper lessonMenuMapper;

    @Override
    public List<LessonMenu> selectByParentId(Integer catalogId) {
        return lessonMenuMapper.selectByParentId(catalogId);
    }

    //查询教师私有备课目录表信息
    @Override
    public LessonMenu selectLessonMenuById(Integer id) {
        return lessonMenuMapper.selectLessonMenuById(id);
    }

    // 查询教师私有备课目录表列表
    @Override
    public List<LessonMenu> selectLessonMenuList(LessonMenu lessonMenu) {
        return lessonMenuMapper.selectLessonMenuList(lessonMenu);
    }

    // 新增教师私有备课目录表
    @Override
    public int insertLessonMenu(LessonMenu lessonMenu) {
        return lessonMenuMapper.insertLessonMenu(lessonMenu);
    }

    //修改教师私有备课目录表
    @Override
    public int updateLessonMenu(LessonMenu lessonMenu) {
        return lessonMenuMapper.updateLessonMenu(lessonMenu);
    }

    //删除教师私有备课目录表对象
    @Override
    public int deleteLessonMenuByIds(String ids) {
        return lessonMenuMapper.deleteLessonMenuByIds(Convert.toStrArray(ids));
    }

    @Override
    public int deleteLessonMenuById(Integer id) {
        return lessonMenuMapper.deleteLessonMenuById(id);
    }

    @Override
    public LessonMenu selectBySort(Integer sort) {
        return lessonMenuMapper.selectBySort(sort);
    }

    @Override
    public Integer selectMax() {
        return lessonMenuMapper.selectMax();
    }

    @Override
    public Integer selectOrderNumASC(Integer sort) {
        return lessonMenuMapper.selectOrderNumASC(sort);
    }

    @Override
    public Integer selectOrderNumDESC(Integer sort) {
        return lessonMenuMapper.selectOrderNumDESC(sort);
    }

}